import math

# 保留小数位数
decimal_reserve = 5


def sin(x):
    x = x * math.pi / 180
    res = math.sin(x)
    return mns_round(res, decimal_reserve)


def cos(x):
    x = x * math.pi / 180
    res = math.cos(x)
    return mns_round(res, decimal_reserve)


def mns_round(num: float, i = decimal_reserve):
    res = round(num, i)
    res_1 = int(num)
    if abs(res - res_1) < (10 ** (0 - decimal_reserve)):
        return res_1
    else:
        return res
